package com.ruoyi.system.domain;

import com.ruoyi.common.annotation.Excels;
import com.ruoyi.common.core.domain.entity.SysDept;
import com.ruoyi.common.core.domain.entity.SysUser;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 班级对象 sys_room
 * 
 * @author ruoyi
 * @date 2025-01-06
 */
public class SysRoom extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** ID */
    private Long roomId;

    /** 班级名称 */
    @Excel(name = "班级名称")
    private String roomName;

    /** 所属学校 */
    private Long deptId;

    private Long userId;

    /** 状态（0正常 1停用） */
    @Excel(name = "状态", readConverterExp = "0=正常,1=停用")
    private String status;

    @Excels({
            @Excel(name = "班主任", targetAttr = "userName", type = Excel.Type.EXPORT)
    })
    private SysUser user;

    @Excels({
            @Excel(name = "所属分校", targetAttr = "deptName", type = Excel.Type.EXPORT)
    })
    private SysDept dept;

    public void setDeptId(Long deptId)
    {
        this.deptId = deptId;
    }

    public Long getDeptId()
    {
        return deptId;
    }

    public void setRoomId(Long roomId)
    {
        this.roomId = roomId;
    }

    public Long getRoomId()
    {
        return roomId;
    }
    public void setRoomName(String roomName) 
    {
        this.roomName = roomName;
    }

    public String getRoomName() 
    {
        return roomName;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }
    public SysDept getDept(){
        if(user == null)
        {
            dept = new SysDept();
        }
        return dept;
    }
    public SysUser getUser(){
        if(user == null)
        {
            user = new SysUser();
        }
        return user;
    }

    public void setUser(SysUser user){
        this.user = user;
    }
    public Long getUserId()
    {
        return userId;
    }
    public void setUserId(Long userId){
        this.userId = userId;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("roomId", getRoomId())
            .append("roomName", getRoomName())
            .append("userId", getUserId())
            .append("status", getStatus())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("updateBy", getUpdateBy())
            .toString();
    }
}
